Integrand size = 19, antiderivative size = 98 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=-\frac {3 a \text {arctanh}(\cos (c+d x))}{8 d}+\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {b \csc (c+d x)}{d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {b \csc ^3(c+d x)}{3 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d} \]
-3/8*a*arctanh(cos(d*x+c))/d+b*arctanh(sin(d*x+c))/d-b*csc(d*x+c)/d-3/8*a* cot(d*x+c)*csc(d*x+c)/d-1/3*b*csc(d*x+c)^3/d-1/4*a*cot(d*x+c)*csc(d*x+c)^3 /d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.10 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.54 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=-\frac {3 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {b \csc ^3(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\sin ^2(c+d x)\right )}{3 d}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {3 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \]
(-3*a*Csc[(c + d*x)/2]^2)/(32*d) - (a*Csc[(c + d*x)/2]^4)/(64*d) - (b*Csc[ c + d*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, Sin[c + d*x]^2])/(3*d) - (3*a* Log[Cos[(c + d*x)/2]])/(8*d) + (3*a*Log[Sin[(c + d*x)/2]])/(8*d) + (3*a*Se c[(c + d*x)/2]^2)/(32*d) + (a*Sec[(c + d*x)/2]^4)/(64*d)
Time = 0.30 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 4000, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (c+d x)}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 4000 |
\(\displaystyle \int \left (a \csc ^5(c+d x)+b \csc ^4(c+d x) \sec (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {3 a \text {arctanh}(\cos (c+d x))}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}+\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {b \csc ^3(c+d x)}{3 d}-\frac {b \csc (c+d x)}{d}\) |
(-3*a*ArcTanh[Cos[c + d*x]])/(8*d) + (b*ArcTanh[Sin[c + d*x]])/d - (b*Csc[ c + d*x])/d - (3*a*Cot[c + d*x]*Csc[c + d*x])/(8*d) - (b*Csc[c + d*x]^3)/( 3*d) - (a*Cot[c + d*x]*Csc[c + d*x]^3)/(4*d)
3.1.20.3.1 Defintions of rubi rules used
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _.), x_Symbol] :> Int[Expand[Sin[e + f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Time = 3.68 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.92
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(90\) |
default | \(\frac {b \left (-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(90\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (9 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+24 b \,{\mathrm e}^{6 i \left (d x +c \right )}-33 i a \,{\mathrm e}^{4 i \left (d x +c \right )}-104 b \,{\mathrm e}^{4 i \left (d x +c \right )}-33 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+104 b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 i a -24 b \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(200\) |
1/d*(b*(-1/3/sin(d*x+c)^3-1/sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+a*((-1/4 *csc(d*x+c)^3-3/8*csc(d*x+c))*cot(d*x+c)+3/8*ln(csc(d*x+c)-cot(d*x+c))))
Leaf count of result is larger than twice the leaf count of optimal. 213 vs. \(2 (90) = 180\).
Time = 0.28 (sec) , antiderivative size = 213, normalized size of antiderivative = 2.17 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=\frac {18 \, a \cos \left (d x + c\right )^{3} - 30 \, a \cos \left (d x + c\right ) - 9 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 9 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 24 \, {\left (b \cos \left (d x + c\right )^{4} - 2 \, b \cos \left (d x + c\right )^{2} + b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 24 \, {\left (b \cos \left (d x + c\right )^{4} - 2 \, b \cos \left (d x + c\right )^{2} + b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 16 \, {\left (3 \, b \cos \left (d x + c\right )^{2} - 4 \, b\right )} \sin \left (d x + c\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]
1/48*(18*a*cos(d*x + c)^3 - 30*a*cos(d*x + c) - 9*(a*cos(d*x + c)^4 - 2*a* cos(d*x + c)^2 + a)*log(1/2*cos(d*x + c) + 1/2) + 9*(a*cos(d*x + c)^4 - 2* a*cos(d*x + c)^2 + a)*log(-1/2*cos(d*x + c) + 1/2) + 24*(b*cos(d*x + c)^4 - 2*b*cos(d*x + c)^2 + b)*log(sin(d*x + c) + 1) - 24*(b*cos(d*x + c)^4 - 2 *b*cos(d*x + c)^2 + b)*log(-sin(d*x + c) + 1) + 16*(3*b*cos(d*x + c)^2 - 4 *b)*sin(d*x + c))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)
\[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right ) \csc ^{5}{\left (c + d x \right )}\, dx \]
Time = 0.21 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.26 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3 \, a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 8 \, b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{2} + 1\right )}}{\sin \left (d x + c\right )^{3}} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{48 \, d} \]
1/48*(3*a*(2*(3*cos(d*x + c)^3 - 5*cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d *x + c)^2 + 1) - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) - 8*b* (2*(3*sin(d*x + c)^2 + 1)/sin(d*x + c)^3 - 3*log(sin(d*x + c) + 1) + 3*log (sin(d*x + c) - 1)))/d
Time = 0.39 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.81 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 192 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 192 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 72 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {150 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
1/192*(3*a*tan(1/2*d*x + 1/2*c)^4 - 8*b*tan(1/2*d*x + 1/2*c)^3 + 24*a*tan( 1/2*d*x + 1/2*c)^2 + 192*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 192*b*log( abs(tan(1/2*d*x + 1/2*c) - 1)) + 72*a*log(abs(tan(1/2*d*x + 1/2*c))) - 120 *b*tan(1/2*d*x + 1/2*c) - (150*a*tan(1/2*d*x + 1/2*c)^4 + 120*b*tan(1/2*d* x + 1/2*c)^3 + 24*a*tan(1/2*d*x + 1/2*c)^2 + 8*b*tan(1/2*d*x + 1/2*c) + 3* a)/tan(1/2*d*x + 1/2*c)^4)/d
Time = 4.63 (sec) , antiderivative size = 211, normalized size of antiderivative = 2.15 \[ \int \csc ^5(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {2\,b\,\mathrm {atanh}\left (\frac {4\,b^2}{\frac {3\,a\,b}{2}-4\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {3\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {3\,a\,b}{2}-4\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}\right )}{d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}+\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {10\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {a}{4}}{16\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4} \]
(a*tan(c/2 + (d*x)/2)^2)/(8*d) - (5*b*tan(c/2 + (d*x)/2))/(8*d) - (2*b*ata nh((4*b^2)/((3*a*b)/2 - 4*b^2*tan(c/2 + (d*x)/2)) - (3*a*b*tan(c/2 + (d*x) /2))/(2*((3*a*b)/2 - 4*b^2*tan(c/2 + (d*x)/2)))))/d + (a*tan(c/2 + (d*x)/2 )^4)/(64*d) - (b*tan(c/2 + (d*x)/2)^3)/(24*d) + (3*a*log(tan(c/2 + (d*x)/2 )))/(8*d) - (a/4 + (2*b*tan(c/2 + (d*x)/2))/3 + 2*a*tan(c/2 + (d*x)/2)^2 + 10*b*tan(c/2 + (d*x)/2)^3)/(16*d*tan(c/2 + (d*x)/2)^4)